import React from 'react';
import styles from './index.less';

// import Tel from '@/assets/svg/oa_icon_phone_default.svg';
// import Email from '@/assets/svg/oa_icon_email_default.svg';

const Card = ({ user }) => (
    <div className={styles.vv_Card}>
        <div className={styles.top}>
            <div className={styles.info}>
                <strong>{user.employeeName}</strong>
                <p>
                    {user.companyName} {user.positionName ? '-' : ''}
                    {user.positionName}
                </p>
            </div>
            <div className={styles.portrait}>
                {user && user.avatarFile && user.avatarFile.length > 0 ? (
                    <img src={user.avatarFile[0].url} alt="头像" />
                ) : (
                    ''
                )}
            </div>
        </div>
        <div className={styles.bottom}>
            <ul>
                {user && user.mobile ? (
                    <li>
                        <a>
                            <i className="iconfont iconoa_icon_phone_default" />
                            {user.areaCode}
                            {user.mobile ? '-' : ''}
                            {user.mobile}
                        </a>
                    </li>
                ) : (
                    ''
                )}

                {user && user.email ? (
                    <li>
                        <a href={`mailto:${user.email}`}>
                            <i className="iconfont iconoa_icon_email_default" />
                            {user.email}
                        </a>
                    </li>
                ) : (
                    ''
                )}
            </ul>
        </div>
    </div>
);
export default Card;
